﻿<%@ Page Title="Things_CropsProduct" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="Things.ThingsWeb.CropsProduct.List" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script language="javascript" src="/js/CheckBox.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<!--Title -->

            <!--Title end -->
            <%--<table border="0" cellpadding="0" cellspacing="1" style="width: 100%;">
                <tr>
                    <td style="width: 1px;">                        
                    </td>
                    <td align="left">
                        <a href="Add.aspx">添加</a>                    
                    </td>
                </tr>
            </table>--%>
            <!--Add  -->

            <!--Add end -->

            <!--Search -->
            <table style="width: 100%;" cellpadding="2" cellspacing="1" class="border">
                <tr>
                    <td style="width: 80px" align="right" class="tdbg">
                         <b>加工时间：</b>
                    </td>
                    <td class="tdbg">                       
                    <asp:TextBox ID="txtKeyword" runat="server"></asp:TextBox>
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <asp:Button ID="btnSearch" runat="server" Text="查询"  OnClick="btnSearch_Click" >
                    </asp:Button>                    
                        
                    </td>
                    <td class="tdbg">
                    </td>
                </tr>
            </table>
            <!--Search end-->
            <br />
            <asp:GridView ID="gridView" runat="server" AllowPaging="True" Width="100%" CellPadding="3"  OnPageIndexChanging ="gridView_PageIndexChanging"
                    BorderWidth="1px" DataKeyNames="ProductID" OnRowDataBound="gridView_RowDataBound"
                    AutoGenerateColumns="false" PageSize="10"  RowStyle-HorizontalAlign="Center" OnRowCreated="gridView_OnRowCreated">
                    <Columns>
                    <asp:TemplateField ControlStyle-Width="30" HeaderText="选择"    >
                                <ItemTemplate>
                                    <asp:CheckBox ID="DeleteThis" onclick="javascript:CCA(this);" runat="server" />
                                </ItemTemplate>
                            </asp:TemplateField> 
                            
		<asp:BoundField DataField="ProductID" HeaderText="ProductID" SortExpression="ProductID" ItemStyle-HorizontalAlign="Center" Visible="false" /> 
		<asp:BoundField DataField="FarmerName" HeaderText="农户" SortExpression="FarmerName" ItemStyle-HorizontalAlign="Center"  /> 
		<asp:BoundField DataField="CropsName" HeaderText="农产品名称" SortExpression="CropsName" ItemStyle-HorizontalAlign="Center"  /> 
		<asp:BoundField DataField="Kind" HeaderText="品种" SortExpression="Kind" ItemStyle-HorizontalAlign="Center"  /> 
		<asp:BoundField DataField="Address" HeaderText="产地" SortExpression="Address" ItemStyle-HorizontalAlign="Center"  /> 
		<asp:BoundField DataField="PlanDate" HeaderText="种植日期" SortExpression="PlanDate" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:yyyy-MM-dd}" /> 

        <asp:BoundField DataField="FactoryName" HeaderText="工厂名称" SortExpression="FactoryName" ItemStyle-HorizontalAlign="Center"  /> 
		<asp:BoundField DataField="ProductDate" HeaderText="加工日期" SortExpression="ProductDate" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:yyyy-MM-dd}"  /> 
		<asp:BoundField DataField="ProductionBatch" HeaderText="生产批次" SortExpression="ProductionBatch" ItemStyle-HorizontalAlign="Center"  /> 
        <asp:BoundField DataField="IsDeleted" HeaderText="IsDeleted" SortExpression="IsDeleted" ItemStyle-HorizontalAlign="Center" Visible="false"  /> 
                            
                            <asp:HyperLinkField HeaderText="详细" ControlStyle-Width="50" DataNavigateUrlFields="ProductID" DataNavigateUrlFormatString="Show.aspx?id={0}"
                                Text="详细"  />

                            <asp:HyperLinkField HeaderText="上架" ControlStyle-Width="50" DataNavigateUrlFields="ProductID" DataNavigateUrlFormatString="../Goods/Add.aspx?id={0}"
                                Text="上架"  />
                            <asp:TemplateField ControlStyle-Width="50" HeaderText="删除"   Visible="false"  >
                                <ItemTemplate>
                                    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Delete"
                                         Text="删除"></asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                </asp:GridView>
               <table border="0" cellpadding="0" cellspacing="1" style="width: 100%;">
                <tr>
                    <td style="width: 1px;">                        
                    </td>
                    <td align="left">
                        <asp:Button ID="btnDelete" runat="server" Text="删除" OnClick="btnDelete_Click"/>                       
                    </td>
                </tr>
            </table>
</asp:Content>
<%--<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceCheckright" runat="server">
</asp:Content>--%>
